﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Contoso.Workflow.Management;
using Contoso.Workflow.LocalService;
using Contoso.Workflow.Model;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        ExpenseData expenseData = new ExpenseData();
        expenseData.User = Session["user"].ToString();
        expenseData.Account = double.Parse(TextBox1.Text);
        expenseData.Reason = TextBoxReason.Text;
        WorkflowMgr workItemMgr = new WorkflowMgr();
        workItemMgr.NewWorkflow("workflow1", expenseData);

        Response.Redirect("Default.aspx");
    }
}
